<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel {
	/**
	 * The Artisan commands provided by your application.
	 *
	 * @var array
	 */
	protected $commands = [
		//
	];

	/**
	 * Define the application's command schedule.
	 *
	 * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
	 * @return void
	 */
	protected function schedule(Schedule $schedule) {
		$schedule->command('sell:newGood')->dailyAt('00:05')->description('昨日销售商品');
       // $schedule->command('system:cart')->everyMinute()
        //    ->between('7:00', '22:00')->description('查看购物车');
        $schedule->command('system:addCart')->dailyAt('00:20')->description('预选商品加入购物车');
		// $schedule->command('system:isbn')->dailyAt('00:10')->description('整理ISBN');
//		$schedule->command('system:douban')->dailyAt('00:30')->description('豆瓣ISBN入库');
	}

	/**
	 * Register the commands for the application.
	 *
	 * @return void
	 */
	protected function commands() {
		$this->load(__DIR__ . '/Commands');

		require base_path('routes/console.php');
	}
}
